using System;
using System.Data;
using System.Configuration;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using Buka.BLL.Model;

/// <summary>
/// Summary description for BukaMembershipUser
/// </summary>
/// 
namespace Buka.Membership
{
    public class BukaMembershipUser : MembershipUser
    {
        private  User _user;
        private DateTime _storedInCache;


        public User UserData
        {
            get { return _user; }
            set { _user = value; }
        }
        public DateTime StoredInCache
        {
            get { return _storedInCache; }
            set { _storedInCache = value; }
        }
        public TimeSpan TimeOut
        {
            get 
            {
                return StoredInCache.AddMinutes(BukaMembershipProvider.CacheTimeOut) - DateTime.Now;
            }
        }
	

        public BukaMembershipUser(User user)
        {
            UserData = user;
            //
            // TODO: Add constructor logic here
            //
            //this.ProviderName = "BukaMembershipProvider";
            //this.UserName = user.UserName;
            //this.LastLoginDate = user.LastLoginDate;
            //this.IsOnline = user.IsOnline;
            //this.Email = user.Email;
            //this.CreationDate = user.CreatedDate;
            //this.UserData = user;
            //StoredInCache = DateTime.Now;
        }
    }
}

